#pragma once

#include "stdafx.h"

#include <conio.h>
#include <stdio.h>
#include <windows.h>
#include <tchar.h>
#include <stdio.h>
#include <strsafe.h>

#include "boost/algorithm/string.hpp"

#include "ISearcheableFile.h"
#include "IIndexableFile.h"



class SearcheableTXTFile : public ISearcheableFile, public IIndexableFile
{
	private:
		std::string fileName;

		/*HANDLE openFile(std::string& fileName);
		DWORD readInBuffer(HANDLE file, char* buffer);*/

	public: 

		SearcheableTXTFile(std::string& fileName);
		~SearcheableTXTFile();

	    std::set<std::string>* search(std::set<std::string>& wordSet, struct searchParameters params);
		void searchForIndexing(struct searchParameters params, std::set<int>* indexes, IndexMap* indexMap);
		
	    void buildIndex(IndexMap* map);
};